home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / CED / cedscripts / SetBookmark.ced < prev    next >
Text File  |  1993-07-07  |  1KB  |  56 lines

  1. /*
  2. ** SetBookmark.ced
  3. **
  4. ** $VER: SetBookmark.ced 1.1.0 (27.05.93)
  5. **
  6. ** This script stores the current cursor position into a numbered
  7. ** bookmark in an ARexx clip.
  8. **
  9. ** This script requires CygnusEd Professional v3.5 (or later) to run.
  10. **
  11. ** Copyright © 1993 ASDG, Incorporated  All Rights Reserved
  12. */
  13.  
  14.  
  15. OPTIONS RESULTS
  16.  
  17.  
  18. NL = '0A'X
  19. TRUE = 1
  20. FALSE = 0
  21.  
  22. /*
  23. ** Get the bookmark description.
  24. */
  25.  
  26. CEDTOFRONT
  27. GETSTRING "1" '"Set which bookmark?"'
  28. IF (RESULT = "") THEN
  29.     EXIT 0
  30. ELSE NewBookmark = RESULT
  31.  
  32. /*
  33. ** If it's one of the menu-selectable bookmarks, then set the
  34. ** appropriate mark.  If the user selected mark 4, then it will be used
  35. ** as the auto-mark.
  36. */
  37.  
  38. IF (NewBookmark >= 1) & (NewBookmark <= 4) THEN
  39.     MARK LOCATION NewBookmark
  40.  
  41. /*
  42. ** Store the cursor's location in a clip.
  43. */
  44.  
  45. STATUS CURSORCOLUMN
  46. CurrCursorCol = RESULT + 1
  47. STATUS CURSORLINE
  48. CurrCursorLine = RESULT + 1
  49.  
  50. BookmarkID = "CEDBookmark" || NewBookmark
  51. BookmarkValue = CurrCursorLine || "," || CurrCursorCol
  52.  
  53. SETCLIP( BookmarkID, BookmarkValue )
  54.  
  55. EXIT 0
  56.